import request from '@/utils/request'

export function getUser() {
    return request({
        url: `/user/`,
        method: 'get',
    })
}

export function getUserById(id) {
    return request({
        url: `/user/${id}/`,
        method: 'get',
    })
}

export function editUser(id,data) {
    return request({
        url: `/user/${id}/`,
        method: 'get',
        data
    })
}


export function delUser(id) {
    return request({
        url: `/user/${id}/`,
        method: 'delete',
    })
}


export function addUser(data) {
    return request({
        url: `/user/`,
        method: 'post',
        data
    })
}


export function setGroup(id,data) {
    return request({
        url: `/user/${id}/set_group/`,
        method: 'post',
        data
    })
}